//
//  CircleButton.h
//  etionUI
//
//  Created by wangjian on 12/9/13.
//  Copyright (c) 2013 GuangZhouXuanWu. All rights reserved.
//

#import <UIKit/UIKit.h>

typedef enum {ECircleButtonTitlePositionLeft, ECircleButtonTitlePositionBottom} ECircleButtonTitlePosition;

@interface CCircleButton : UIControl

- (id)initWithFrame:(CGRect)frame normalImage:(UIImage *)normalImage highlightedImage:(UIImage *)highlightedImage;
- (id)initWithNormalImage:(UIImage *)normalImage highlightedImage:(UIImage *)highlightedImage radius:(CGFloat)radius title:(NSString *)title titlePosition:(ECircleButtonTitlePosition)titlePosition;
- (void)setTitleState:(BOOL)isShow animated:(BOOL)animated;

@end

@interface CCircleColorButton : CCircleButton

- (void)setColor:(UIColor *)color animated:(BOOL)animated;
- (void)setRadius:(CGFloat)radius animated:(BOOL)animated;

@end

@interface CRoundButton : UIControl

@property (nonatomic, retain) UIColor *renderColor;     //默认为0x3498DB，该值用于渲染控件边框和选中部分的背景色，如果内容是字符串，该值也是未选中状态下的字符颜色
@property (nonatomic, retain) UIColor *selectedColor;   //默认为0xFFFFFF，只用于选中状态下的字符颜色
@property (nonatomic, assign) CGFloat cornerRadius;       //default is 5

+ (id)buttonWithTitle:(NSString *)title;
+ (id)buttonWithNormalImage:(UIImage *)normalImage highlightedImage:(UIImage *)highlightedImage;

- (id)initWithTitle:(NSString *)title;
- (id)initWithNormalImage:(UIImage *)normalImage highlightedImage:(UIImage *)highlightedImage;

@end

